#!/usr/bin/env perl

use strict;
use warnings;
use FindBin;
use lib ("$FindBin::Bin/../PerlLib");
use Gene_obj;
use Gene_obj_indexer;
use GFF3_utils;

use Carp;


my $usage = "usage: $0 file.GFF3 \n\n";

my $gff3_file = $ARGV[0] or die $usage;


main: {

    my $gene_obj_indexer_href = {};
    
    my $asmbl_id_to_gene_list_href = &GFF3_utils::index_GFF3_gene_objs($gff3_file, $gene_obj_indexer_href);

    foreach my $asmbl_id (sort keys %$asmbl_id_to_gene_list_href) {
        
        my @gene_ids = @{$asmbl_id_to_gene_list_href->{$asmbl_id}};
        
        
        foreach my $gene_id (@gene_ids) {
            
            ## note models of isoforms are bundled into the same gene object.
            my $gene_obj_ref = $gene_obj_indexer->get_gene($gene_id);
            

        }
    }
	
        
    exit(0);
}

